home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Button;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.GridLayout;
- import java.awt.Label;
-
- public class EventDemo extends Applet {
- // $FF: renamed from: n int
- static final int field_0 = 4;
- Label lab = new Label("?", 1);
-
- public void init() {
- ((Container)this).setLayout(new GridLayout(4, 4));
- ((Component)this).setFont(new Font("Helvetica", 1, 24));
- Integer.parseInt(((Applet)this).getParameter("width"));
- Integer.parseInt(((Applet)this).getParameter("height"));
-
- for(int var1 = 0; var1 < 4; ++var1) {
- for(int var2 = 0; var2 < 4; ++var2) {
- int var3 = var1 * 4 + var2;
- if (var3 > 0) {
- ((Container)this).add(new Button(String.valueOf(var3)));
- }
- }
- }
-
- this.lab.setFont(new Font("Helvetica", 2, 24));
- ((Container)this).add(this.lab);
- }
-
- public boolean action(Event var1, Object var2) {
- if (var2 instanceof String) {
- this.lab.setText((String)var2);
- }
-
- return false;
- }
- }
-